# -*- coding: utf-8 -*-

from django.db import models

  
class Link(models.Model):
    '''链接信息
    
    '''
    title = models.CharField("名称", max_length=100)
    display = models.BooleanField("显示", default=True)
    description = models.CharField("描述", max_length=200, null=True, blank=True, help_text="限200个字符")
    url = models.CharField("URL", max_length=500, null=True, blank=True)
    date = models.DateTimeField("发布日期", auto_now_add=True)

    class Meta:
        verbose_name = "链接信息"
        verbose_name_plural = verbose_name
        ordering = ['title', 'date']

    def __str__(self):
        return self.title
    

    
    
    

 

    
    